import request from '@/utils/request'

// 查询备用金列表
export function listFinanceImprest(query) {
  return request({
    url: '/oa/financeImprest/list',
    method: 'get',
    params: query
  })
}

// 查询备用金详细
export function getFinanceImprest(id) {
  return request({
    url: '/oa/financeImprest/' + id,
    method: 'get'
  })
}

// 新增备用金
export function addFinanceImprest(data) {
  return request({
    url: '/oa/financeImprest',
    method: 'post',
    data: data
  })
}

// 修改备用金
export function updateFinanceImprest(data) {
  return request({
    url: '/oa/financeImprest',
    method: 'put',
    data: data
  })
}

// 删除备用金
export function delFinanceImprest(id) {
  return request({
    url: '/oa/financeImprest/' + id,
    method: 'delete'
  })
}

// 获取没有采购流程的项目信息
export function getProjectList() {
    return request({
        url: '/oa/financeImprest/getProjectList',
        method: 'get'
    })
}

export function queryFinanceImprestByProjectName(data) {
  return request({
    url: '/oa/financeImprest/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
